package attributes;

import java.util.HashMap;
import java.util.List;

import trees.AttributeNode;

public class AttributeGraphPlusDictionary {

	private HashMap<Integer, Integer> childParentPairs;
	//uses indexing obtained by order of token discovery in input file
	
	private HashMap<Integer, AttributeNode> allNodes;
	//key is same ordinal value by which corresponding node was discovered in tree
	
	//passed into the class at instantiation;
	private List<Integer> roots;

	private HashMap<Integer, String> dictionary;

	private List<String> leaves;	
	

	/**
	 * @param childParentPairs a list of child parent pairs by node index
	 * @param dictionary a map from node indices to strings
	 * @param leaves a list of the names of the strings
	 * @param roots a list of the indices of the roots
	 */
	public AttributeGraphPlusDictionary(
			HashMap<Integer, Integer> childParentPairs,
			HashMap<Integer, String> dictionary,
			List<String> leaves,
			List<Integer> roots,
			HashMap<Integer, AttributeNode> nodes
	) {
		super();
		this.childParentPairs = childParentPairs;
		this.dictionary = dictionary;
		this.roots = roots;
		this.leaves = leaves;
		this.allNodes = nodes;
	}
	
	
	
	public List<Integer> getRoots() {
		return roots;
	}



	public List<String> getLeaves() {
		return leaves;
	}

	public HashMap<Integer, String> getDictionary() {
		return dictionary;
	}

	public HashMap<Integer, AttributeNode> getAllNodes(){
		return allNodes;
	}
	
}
